//
//  CommodityInfoView.m
//  DA_V
//
//  Created by 中亿世联前台 on 15/4/29.
//  Copyright (c) 2015年 zhouhai. All rights reserved.
//

#import "CommodityInfoView.h"
#import "InterFace.h"

@implementation CommodityInfoView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (void)layoutSubviews{
    [super layoutSubviews];
    self.addNum.layer.borderColor = LineColor.CGColor;
    self.addNum.layer.borderWidth = 1.0;
    self.subtractNum.layer.borderColor = LineColor.CGColor;
    self.subtractNum.layer.borderWidth = 1.0;
    self.shoppingNum.layer.borderColor = LineColor.CGColor;
    self.shoppingNum.layer.borderWidth = 1.0;
}

#pragma -mark 减商品
- (IBAction)sbutractClick:(UIButton *)sender {
    int i = self.shoppingNum.text.intValue;
    i=i-1;
    self.shoppingNum.text = [NSString stringWithFormat:@"%d",i];
}

#pragma -mark 加商品
- (IBAction)addClick:(UIButton *)sender {
    int i = self.shoppingNum.text.intValue;
    i=i+1;
    self.shoppingNum.text = [NSString stringWithFormat:@"%d",i];
}
@end
